﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class EmployeesSalary_EmpSalaryAdjustList : System.Web.UI.Page
{
    private Srvtools.WebDataSet WMaster;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            InitializeComponent();

            WMaster.SetWhere("EmpSalaryAdjust.EmployeeId=" + Request["eid"].ToString());
            Master.DataSource = WMaster;

            MasterPage_MasterPage master = (MasterPage_MasterPage)this.Page.Master;
            master.HelpHref = "";
            master.PageName = "员工薪资调整记录";
            master.PicUrl = "";
            master.IntiBar();
        }
    }

    private void InitializeComponent()
    {
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EmployeesSalary_EmpSalaryAdjustList));
        this.WMaster = new Srvtools.WebDataSet();
        ((System.ComponentModel.ISupportInitialize)(this.WMaster)).BeginInit();
        // 
        // WMaster
        // 
        this.WMaster.Active = true;
        this.WMaster.AlwaysClose = false;
        this.WMaster.PacketRecords = 100;
        this.WMaster.Position = -1;
        this.WMaster.RemoteName = "SEmployees.EmpSalaryAdjust";
        this.WMaster.ServerModify = false;
        ((System.ComponentModel.ISupportInitialize)(this.WMaster)).EndInit();

    }

    protected void wgvMaster_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            DataRowView drv = (DataRowView)e.Row.DataItem;
            Label ccc = (Label)e.Row.FindControl("lEmpSalaryAdjustAjust");

            Label lblStatus = (Label)e.Row.FindControl("lblStatus");
            lblStatus.Text = (bool)drv["AdjustStatus"] ? "<b>启用</b>" : "<font style='color:silver'>已作废</font>";
        }
    }

    //protected void LinkButton1_Click(object sender, EventArgs e)
    //{
    //    Response.Redirect(Server.UrlDecode(Request["redurl"].ToString()));
    //}
    protected void lbt_Click(object sender, EventArgs e)
    {
        Response.Redirect(Server.UrlDecode(Request["redurl"].ToString()));
    }
}

